package cn.appsys.controller.backenduser;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.appsys.service.backenduser.BackendUserService;
import cn.appsys.tools.Constants;

/**
 * 管理员用户的控制类
 * 
 * @author 寇超强
 *
 */
@Controller
@RequestMapping("sys/backend")
public class BackendUserController {

	@Resource
	BackendUserService backendUserService;

	/**
	 * 登陆成功跳转主界面
	 */
	@RequestMapping("/main")
	public String main(HttpSession session) {
		return "backend/main";
	}

	/**
	 * 推出登陆
	 */
	@RequestMapping("/logout")
	public String outLogin(HttpSession session) {
		session.removeAttribute(Constants.USER_SESSION);
		return "redirect:/userLogin.html";
	}
	
	
}
